package com.ui.basic.assembler.masterdata;

import java.util.List;

import com.common.basic.base.BaseAssembler;
import com.ui.basic.command.masterdata.CommandBank;
import com.ui.basic.ibatis.model.masterdata.TblMBank;

public class BankAssembler implements BaseAssembler<TblMBank, CommandBank> {

	public CommandBank toDto(TblMBank entity) {
		CommandBank dto = new CommandBank();
		dto.setId(entity.getId());
		dto.setBankCode(entity.getCode());
		dto.setBankName(entity.getName());
		dto.setCountryId(entity.getCountryId());
		return dto;
	}

	public List<CommandBank> toDtoList(List<TblMBank> listEntity) {

		return null;
	}

	public TblMBank toEntity(CommandBank dto) {
		TblMBank entity = new TblMBank();
		entity.setId(dto.getId());
		entity.setCode(dto.getBankCode());
		entity.setName(dto.getBankName());
		entity.setCountryId(dto.getCountryId());

		return entity;
	}

}
